<template>
    <div>
        <tab title="购物车"></tab>
        <div v-if="list.length > 0">
            <van-card v-for="(v, i) in list" :price="v.goods_price" :title="v.goods_name">
                <template #thumb>
                    <div style="display: flex;">
                        <van-checkbox v-model="v.checked"></van-checkbox>
                        <img :src="v.goods_small_logo ? v.goods_small_logo : 'https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg'"
                            alt="" style="width: 6rem;height: 6rem;">
                    </div>
                </template>
                <template #footer>
                    <van-stepper v-model="v.num" />
                </template>
            </van-card>
        </div>
        <div v-else>
            <van-empty description="暂无购物车数据" />
        </div>


    </div>
</template>

<script setup>
import tab from '@/components/tab.vue';


import { useCounterStore } from '@/stores/counter'
// 在组件内部的任何地方均可以访问变量 `store` ✨
const store = useCounterStore()

let list = store.name


</script>

<style lang="scss" scoped></style>